home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
MPW_TOOL
/
TOOLS
/
TOOLS_WI
/
ICON_8
/
MEMMON_F
/
MEMMON.H
< prev
next >
Wrap
Text File
|
1990-03-02
|
3KB
|
108 lines
/*
* memmon.h: general memmon definitions.
*/
#include "::h:config.h"
#include "mproto.h" /* memmmon function prototypes */
#include "msymbols.h" /* color labels and definitions */
#ifndef Global
#define Global extern
#endif /* Global */
/*
* Manifest constants.
*/
#define LineSize 100 /* size for line buffers */
#define TextLength 112 /* prompt/legend line size */
#define TextLines 2 /* number of such lines */
#define StatusLength 35 /* size of the status message */
#define RegionLength 35 /* typical max for the region display */
#define TitleLength (TextLength - StatusLength - RegionLength)
#define SpaceCode '-' /* special code for spacing legend */
/*
* Command options.
*/
Global char *progname; /* program name, for diagnostics etc. */
Global int showmarking; /* show marking phase? */
Global int gclimit; /* quit after this many gc's */
Global int pauselimit; /* quit after this many pauses */
Global char *whenpause; /* when to pause */
Global char *whichregs; /* which regions to display */
Global char *title; /* display title */
/*
* Output parameters. Some of these are changeable by command option;
* not all devices honor such changes. Others are calculated.
*/
Global int granularity; /* display granularity */
Global int sfreq; /* screen frequency for PostScript */
Global int width, height; /* output image size, in pixels */
Global int textrow; /* output height of a legend box */
Global int textsep; /* pixels separating legend from mem */
Global int memrow; /* height of one memory row */
/* (can decrease but not increase) */
Global int batchmode; /* nonzero if batch mode output */
Global int memheight; /* height of the memory region */
Global word mempixels; /* total horizontal memory pixels */
Global int ymin; /* minimum y value actually used */
/*
* The current color map, in three sections.
* The first section remains constant, once initialized.
* The second sections colors unmarked blocks.
* The third section colors marked blocks.
* Colors in the second and third sections change dynamically during g.c.
*/
#define MapSize (3*NColors) /* color map size */
#define Unmarked NColors /* offset to unmarked colors */
#define Marked (2*NColors) /* offset to marked colors */
Global struct {
unsigned char red; /* primary color components 0 - 255 */
unsigned char green;
unsigned char blue;
unsigned char uniq; /* lowest numbered identical color */
} cmap[MapSize];
Global word blkcolor[256]; /* block entry, indexed by key char */
/*
* Region information.
*/
struct region {
word base; /* base address */
word used; /* memory used */
word length; /* region size */
word displ; /* length displayed */
word saddr; /* screen address */
};
Global struct region stc; /* static region information */
Global struct region str; /* string region information */
Global struct region blk; /* block region information */
/*
* Miscellaneous global variables.
*/
Global word ncollect; /* total garbage collections */
Global word nstatic, nstring, nblock, nexplicit; /* region totals */
Global FILE *ifile; /* input file */
Global FILE *ttyi, *ttyo; /* tty file for prompts & acks */
/*
* Redefinitions
*/